/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.trumah.model;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author rafaell
 */
@Entity
@Table(name = "Coordenadas")
@NamedQueries({@NamedQuery(name = "Coordenadas.findAll", query = "SELECT c FROM Coordenadas c"), @NamedQuery(name = "Coordenadas.findById", query = "SELECT c FROM Coordenadas c WHERE c.id = :id"), @NamedQuery(name = "Coordenadas.findByLatitude", query = "SELECT c FROM Coordenadas c WHERE c.latitude = :latitude"), @NamedQuery(name = "Coordenadas.findByLongitude", query = "SELECT c FROM Coordenadas c WHERE c.longitude = :longitude")})
public class Coordenadas implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Long id;
    @Column(name = "latitude")
    private Long latitude;
    @Column(name = "longitude")
    private Long longitude;

    public Coordenadas() {
    }

    public Coordenadas(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getLatitude() {
        return latitude;
    }

    public void setLatitude(Long latitude) {
        this.latitude = latitude;
    }

    public Long getLongitude() {
        return longitude;
    }

    public void setLongitude(Long longitude) {
        this.longitude = longitude;
    }

//    public List<Endereco> getEnderecoList() {
//        return enderecoList;
//    }
//
//    public void setEnderecoList(List<Endereco> enderecoList) {
//        this.enderecoList = enderecoList;
//    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Coordenadas)) {
            return false;
        }
        Coordenadas other = (Coordenadas) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "trumah.Coordenadas[id=" + id + "]";
    }

}
